#include <stdio.h>
//计算1+1/(1+2)+1/(1+2+3)...  的值
int main(void)
{
	int i = 0;
	double fm = 1;
	double sum = 0;
	int a;
	printf("请输入一个数");
	scanf_s("%d", &a);
	for (i = 1; i < a; i++)
	{
		sum += 1 / fm;
		fm += i + 1;
	}
	printf("%.14lf", sum);
	return 0;
}